'use strict';

const Controller = require('egg').Controller;

class CollectController extends Controller {
  async index() {
    const {ctx} = this;
    const db = this.app.mongodb;
    const res = await db.collection('user').find().toArray();

    ctx.body={
        status:200,
        msg:'user',
        res,
    }
  }
}

module.exports = CollectController;
